package framework.captcha;

import org.springframework.cache.Cache;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface Captcha {

    Cache getCache();

    CaptchaGenerator getGenerator();

    CaptchaInfo newCaptcha(String id);

    boolean check(String id, String code);

    void remove(String id);

}
